﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HelloMinasan.Domain;
using HelloMinasan.Domain.Dtos;
using HelloMinasan.Configuration;
using HelloMinasan.UserDefinedType.Dtos;
using HelloMinasan.UserDefinedType;

namespace HelloMinasan.Web.ViewModels
{
    public class HotTrendListModel
    {
        public HotTrendListModel()
        {
            CurrentPage = 1;
            PageSize = GeneralSetting.CommonPageSizeList;
            UserId = 0;
            TotalRecords = 0;

            //data sample
            ListHotTrendItemDto = new List<HotTrendItemDto>();
            HotTrendItemDto hotTrendItemDto1 = new HotTrendItemDto();
            hotTrendItemDto1.HotTrendType = EnumHotTrendType.Vocabulary.ToString();
            hotTrendItemDto1.Language = "en";
            hotTrendItemDto1.Dictionary = "en_vi";
            hotTrendItemDto1.Word = "love";

            HotTrendItemDto hotTrendItemDto2 = new HotTrendItemDto();
            hotTrendItemDto2.HotTrendType = EnumHotTrendType.Vocabulary.ToString();
            hotTrendItemDto2.Language = "en";
            hotTrendItemDto2.Dictionary = "en_vi";
            hotTrendItemDto2.Word = "love";

            HotTrendItemDto hotTrendItemDto3 = new HotTrendItemDto();
            hotTrendItemDto3.HotTrendType = EnumHotTrendType.Vocabulary.ToString();
            hotTrendItemDto3.Language = "en";
            hotTrendItemDto3.Dictionary = "en_vi";
            hotTrendItemDto3.Word = "love";

            HotTrendItemDto hotTrendItemDto4 = new HotTrendItemDto();
            hotTrendItemDto4.HotTrendType = EnumHotTrendType.Vocabulary.ToString();
            hotTrendItemDto4.Language = "en";
            hotTrendItemDto4.Dictionary = "en_vi";
            hotTrendItemDto4.Word = "love";

            HotTrendItemDto hotTrendItemDto5 = new HotTrendItemDto();
            hotTrendItemDto5.HotTrendType = EnumHotTrendType.Vocabulary.ToString();
            hotTrendItemDto5.Language = "en";
            hotTrendItemDto5.Dictionary = "en_vi";
            hotTrendItemDto5.Word = "love";

            ListHotTrendItemDto.Add(hotTrendItemDto1);
            ListHotTrendItemDto.Add(hotTrendItemDto2);
            ListHotTrendItemDto.Add(hotTrendItemDto3);
            ListHotTrendItemDto.Add(hotTrendItemDto4);
            ListHotTrendItemDto.Add(hotTrendItemDto5);
            TotalRecords = 5;
        }

        public int CurrentPage { get; set; }
        public int PageSize { get; set; }
        public int TotalRecords { get; set; }
        public int UserId { get; set; }
        public string FirstNameMember { get; set; }
        public string LastNameMember { get; set; }
        public string FullNameMember
        {
            get
            {
                return string.Format("{0} {1}", FirstNameMember, LastNameMember);
            }
        }

        public bool IsOwner { get; set; }
        public UserType CurrentUserType { get; set; }
        public IList<HotTrendItemDto> ListHotTrendItemDto { get; set; }
    }
}